﻿@model LessBoard.Models.ConfigModel
@{
    ViewBag.Title = "Translations";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var grid = new WebGrid(Model.TranslationSettings);
}
<section id="main" class="column">
    <article class="module width_half">
        <h2>Translations</h2>
        <div class="message_list">
            <div class="module_content">
                @grid.GetHtml(tableStyle: "tablesorter", columns: new[] {grid.Column("Id", 
                                        format: p => Html.ActionLink(
                                        "Edit",
                                        "TranslationsByCode",
                                        new { code =p.Code },
                                        new { @class = "detailsLink" })),
                                        grid.Column("Code")})
            </div>
        </div>
    </article>
    <div id="translationsOfCodeContainer">
    </div>
    <script type="text/javascript">
        $(function () {
            $('.detailsLink').click(function () {
                $('#translationsOfCodeContainer').load(this.href);
                return false;
            });
        });
    </script>
</section>
